<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition template="./../../Template/generalTemplate.xhtml">



            <ui:define name="content">
                <h:form>
                    <f:view beforePhase="#{systemSettingsManagedBean.initView}">
                        <p:panel id="systemSettings" header="System Settings" style="height:495px;">
                            <p:growl id="growl" showDetail="true" />
                            <div style="margin-top:50px;margin-left:150px;margin-right:180px;">
                            <h:panelGrid columns="4">
                                <h:outputText value="Direct Sales Credit Limit:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.directSalesCreditLimit}" />
                                <h:outputText value="Whole Sales Credit Limit:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wholeSalesCreditLimit}" />

                                <h:outputText value="Large Order Amount Limit:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.largeOrderAmount}" />
                                <br/>
                                <h:outputText/>

                                <h:outputText value="DS Initial Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.dsInitialDiscount}" />
                                <br/>
                                <h:outputText/>

                                <h:outputText value="DS Level 1 Quantity:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.dsLevelOneQuantity}" />
                                <h:outputText value="DS Level 1 Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.dsLevelOneDiscount}" />

                                <h:outputText value="DS Level 2 Quantity:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.dsLevelTwoQuantity}" />
                                <h:outputText value="DS Level 2 Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.dsLevelTwoDiscount}" />

                                <h:outputText value="WS Initial Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wsInitialDiscount}" />
                                <br/>
                                <h:outputText/>

                                <h:outputText value="WS Level 1 Quantity:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wsLevelOneQuantity}" />
                                <h:outputText value="WS Level 1 Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wsLevelOneDiscount}" />

                                <h:outputText value="WS Level 2 Quantity:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wsLevelTwoQuantity}" />
                                <h:outputText value="WS Level 2 Discount:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.wsLevelTwoDiscount}" />
                                
                                <h:outputText value="Raw Material Purchasing Time:" />
                                <p:inputText value="#{systemSettingsManagedBean.systemParameter.rawMaterialPurchasingTimer}" />
                                <br/>
                                <p:commandButton value="Start Timer" update="growl" actionListener="#{systemSettingsManagedBean.startRawMaterialPurchasingTimer}" style="float:right;" />
                                              
                            </h:panelGrid>
                            <br/>
                            <hr/>
                            <p:commandButton value="Update" update="growl" actionListener="#{systemSettingsManagedBean.update}" />
                            </div>
                        </p:panel>
                    </f:view>
                </h:form>
            </ui:define>


        </ui:composition>

    </body>
</html>
